#ifndef _COPTIONSSTATE_H_
#define _COPTIONSSTATE_H_

#define NUM_OPTIONS 3

// SGD singeltons:
#include "Wrappers\CSGD_Direct3D.h"
#include "Wrappers\CSGD_DirectInput.h"
#include "Wrappers\CSGD_FModManager.h"
#include "Wrappers\CSGD_TextureManager.h"

#include "IGameState.h"

class COptionsState : public IGameState
{
	int						m_nCurrentSelection;
	int						m_nCursorID;
	int						m_nBackgroundImageID;
	int						m_nBackgroundMusicID;
	int						m_nMovementSFXID;
	int						m_nSFXID;
	int						m_nBitmapFontID;
	int						m_nScreenWidth;
	int						m_nScreenHeight;
	float					m_fVolume;
	float					m_fSFXVolume;
	float					m_fPan;
	//bool					isFull;

	// Saved values
	float					m_fSaveVolume;
	float					m_fSaveSFX;

	COptionsState(void);
	COptionsState(const COptionsState&);
	~COptionsState(void);
	COptionsState& operator=(const COptionsState&);

public:
	static COptionsState* GetInstance(void);

	// Accessors & mutators
	float GetVolume() { return m_fVolume; }
	float GetSFXVolume() { return m_fSFXVolume; }
	void SetVolume(float fVolume) { m_fVolume = fVolume; }
	void SetSFXVolume(float fSFX) { m_fSFXVolume = fSFX; }

	bool Load(const char* szXmlFileName);
	bool Save(const char* szXmlFileName);

	void SaveOptionsSettings(float fMusicVol, float fSfxVol);
	bool LoadOptionsSettings(float* fMusicVol, float* fSfxVolume);

	void Enter(void);
	bool Input(void);
	void Update(float fElapsedTime);
	void Render(void);
	void Exit(void);
};

#endif